1. Field of the Invention
The present invention relates to an imaging apparatus and a method for controlling the imaging apparatus, and particularly, to a technique suitable for use in focus adjustment during the wait for shooting.
2. Description of the Related Art
Conventionally, in an electronic still camera, a video camera, or the like, when an autofocus (hereinafter, referred to as AF) is executed, a method is used in which a lens position where a high-frequency component of a luminance signal obtained from an image sensor, such as a charge-coupled device (CCD), (hereinafter referred to as an AF evaluation value) is maximized is determined to be an in-focus position. As one of these methods, the following scanning method is known.
In a first scanning method, the AF evaluation value obtained from a predetermined area (hereinafter referred to as an AF frame) in an image sensor is stored while driving a focus lens throughout a scanning range. Then, a focus lens position corresponding to the maximum value thereof among the stored AF evaluation values (hereinafter referred to as a peak position) is determined to be an in-focus position. The in-focus position is a lens position to be assumed that focus is adjusted on an object.
As a second scanning method, there is a technique of detecting an object to be focused using an image signal obtained from an image sensor to execute an AF based on information about the detected object (size and position), thereby adjusting focus at a high speed.
For example, in Japanese Patent Application Laid-Open No. 2006-201282, a technique is discussed in which based on the size of the detected face, an approximate distance is obtained, then, based on the obtained distance, a position determined to be a scanning start point is determined, and the far side farther than that position is not scanned, thereby shortening an AF time. Further, for example, in Japanese Patent Application Laid-Open No. 2009-31760, a technique is discussed in which a searching range of scanning by a focus lens is set based on a time-series change in size of the detected face.
However, in a digital camera discussed in the above-described Japanese Patent Application Laid-Open No. 2006-201282 and an imaging apparatus discussed in Japanese Patent Application Laid-Open No. 2009-31760, a scanning range or a searching range is set based on the size of an object. Accordingly, when the position of the object is changed, a background-focused state may occur in which focus is adjusted on the background located far from the main object.
This is because when the position of the object has been changed, an AF frame may move away from the object.